/*
 * @Author: anxia.ack anchenkai@come-future.com
 * @Date: 2025-04-19 23:04:56
 * @LastEditors: anxia.ack anchenkai@come-future.com
 * @LastEditTime: 2025-05-07 22:54:58
 * @FilePath: /free-learning/src/enums/MessageEnum.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

export enum MessageEnum {
  // 评论
  REVIEW = "review",
  // 点赞
  LIKE = "like",
  // 推荐
  RECOMMEND = "recommend",
  // 信息审核
  INFO_AUDIT = "info_audit",
  // 信息审核通过
  INFO_AUDIT_PASS = "info_audit_pass",
  // 信息审核未通过
  INFO_AUDIT_NOT_PASS = "info_audit_not_pass",
  // 课程审核
  COURSE_AUDIT = "course_audit",
  // 课程审核通过
  COURSE_AUDIT_PASS = "course_audit_pass",
  // 课程审核未通过
  COURSE_AUDIT_NOT_PASS = "course_audit_not_pass",
  // 评论审核
  REVIEW_AUDIT = "review_audit",
  // 评论审核通过
  REVIEW_AUDIT_PASS = "review_audit_pass",
  // 评论审核未通过
  REVIEW_AUDIT_NOT_PASS = "review_audit_not_pass",
  // 消息
  MESSAGE = "message",
  // 咨询师评价
  CONSULTANT_REVIEW = "consultant_review",
  // 咨询师评价审核
  CONSULTANT_REVIEW_AUDIT = "consultant_review_audit",
}

export const useNeedSettleMessage = (type: string) => {
  return (
    type === MessageEnum.INFO_AUDIT ||
    type === MessageEnum.COURSE_AUDIT ||
    type === MessageEnum.INFO_AUDIT_PASS ||
    type === MessageEnum.COURSE_AUDIT_PASS ||
    type === MessageEnum.INFO_AUDIT_NOT_PASS ||
    type === MessageEnum.COURSE_AUDIT_NOT_PASS ||
    type === MessageEnum.REVIEW_AUDIT ||
    type === MessageEnum.REVIEW_AUDIT_PASS ||
    type === MessageEnum.MESSAGE ||
    type === MessageEnum.CONSULTANT_REVIEW ||
    type === MessageEnum.CONSULTANT_REVIEW_AUDIT
  );
};

export const Message2Router: Record<string, string> = {
  [MessageEnum.INFO_AUDIT]: "/counselor-manage/counselor/audit",
  [MessageEnum.COURSE_AUDIT]: "/course-manage/course/audit",
  [MessageEnum.INFO_AUDIT_PASS]: "/profile",
  [MessageEnum.COURSE_AUDIT_PASS]: "/course-manage/course",
  [MessageEnum.INFO_AUDIT_NOT_PASS]: "/profile",
  [MessageEnum.COURSE_AUDIT_NOT_PASS]: "/course-manage/course",
  [MessageEnum.REVIEW_AUDIT]: "/courseReviewAudit",
  [MessageEnum.REVIEW_AUDIT_PASS]: "/review/myCourseReview",
  [MessageEnum.MESSAGE]: "/chat-message/my-message",
  [MessageEnum.CONSULTANT_REVIEW]: "/myReview",
  [MessageEnum.CONSULTANT_REVIEW_AUDIT]: "/consultantReviewAudit",
};
